//
//  UIButton + Extension.swift
//  MYSwiftWeiBo
//
//  Created by shingwai chan on 16/3/5.
//  Copyright © 2016年 ChanShingWai. All rights reserved.
//

import UIKit


extension UIButton {

    convenience init(imageName: String , bkImageName: String = "timeline_card_bottom_background" , title: String , font: CGFloat = 11) {
    
        self.init()
        
        setBackgroundImage(UIImage(named: bkImageName), forState: UIControlState.Normal)
        setBackgroundImage(UIImage(named: "\(bkImageName)_highlighted"), forState: UIControlState.Highlighted)
        
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        
        setTitle(title, forState: UIControlState.Normal)
        
        setTitleColor(UIColor.lightGrayColor(), forState: UIControlState.Normal)
        titleLabel?.font = UIFont.systemFontOfSize(11)
    }
    
    
    

}